package sdk3.components.remoteService
{
	
	import flash.events.Event;
	
	public class RegisterEvent extends Event
	{
		// Public constructor.
		public function RegisterEvent(type:String,result:Object = null)
		{
			// Call the constructor of the superclass.
			super(type);
			
			// Set the new property.
			this.result = result;
		}
		
		/** 
		 * iterates through the list of loaded users & checks if there is a user with the given username and given password 
		 * sends username + password to server
		 * server responds with
		 * REGISTER_RESULT = 'success'
		 * or
		 * REGISTER_RESULT = 'user does allready exist'
		 * or
		 * REGISTER_RESULT = 'registration failed'
 		 **/
		// Define a public variable to hold the state of the enable property.
		public var result:Object = {REGISTER_RESULT:''};
		public static const RESULT:String = 'REGISTER_RESULT';
		public static const FAULT:String = 'REGISTER_FAULT';
		public static const FAULT_USER_ALLREADY_EXISTS:String = 'FAULT_USER_ALLREADY_EXISTS';
		
		// Override the inherited clone() method.
		override public function clone():Event
		{
			return new RegisterEvent(type, result);
		}
	}
}